#include "Global.h"
#include "..\..\User\config.h"

void App_Cycle(void)
{
	Timer_TaskRun();
	f_DealUARTPWR_Routine();
	f_DealUARTHead_Routine();
	f_DealUARTWIFI_Routine();
	DealKey_Event();
	f_Flow_Routine();
	f_Flow_FsmCavity_Routine();
	f_Flow_FsmFan_Routine();
	
	if(Api_Tick_PopFlag_1ms())
	{
		
	}
	
	
	if(Api_Tick_PopFlag_10ms())
	{
		Read_Touch_KEY();
		Read_Dis2_KEY();
		bsp_KeyScan();
		Knob_Event();
	
	}
	if(Api_Tick_PopFlag_50ms())
	{
		
		wifitxupdatatx_50MSRoutine();
		f_Flow_FLICKER_Control();
		f_Flow_Display();
		Wirte_Dis2_KEY(&m_disp_buf[0]);
	}
	if(Api_Tick_PopFlag_100ms())
	{
		Api_TM1652_KnobDisp();
		f_DealUARHead_100MsRoutine();
		f_DealUARPWR_100MsRoutine();
		f_DealUARWIFI_100MsRoutine();
		f_flow_Wifi_100MSRoutine();
		f_flow_Alarm();
		App_TM1652_LOAD();
	}
	if(Api_Tick_PopFlag_500ms())
	{
		add_ERR20_21_CNT();
		Rtc_pro();
	}
	if(Api_Tick_PopFlag_1000ms())
	{	
		if(Head_State.Fan_Dis_Delay >0)
		{
			
			Head_State.Fan_Dis_Delay--;
		}
		f_flow_Count_Stove();
		f_flow_PowerONTime_1S_Routine();
		Api_RTC_Init();
		Box_real_time_temp();
		wifi_1000MSRoutine();
		f_flow_Count_Oil_Remind_cnt();
		add_ERR20_21_Fir_CNT();
	}
}
